﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMoq.Core
{
    public class EqualityCompare<T> : IEqualityComparer<T> where T : IEquatable<T> 
    {
        #region IEqualityComparer<T> Members

        public bool Equals(T x, T y)
        {
            return x.Equals (y);
        }

        public int GetHashCode(T obj)
        {
            return obj.GetHashCode();
        }

        #endregion
    }
}
